package ${pPackage}.controller;

import ${pPackage}.pojo.${ClassName};
import ${pPackage}.service.${ClassName}Service;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * (${ClassName})表控制层
 *
 * @author ${author}
 * @since ${createTime}
 */
@RestController
@RequestMapping("${ClassName?uncap_first}")
public class ${ClassName}Controller {
    /**
     * 服务对象
     */
    @Resource
    private ${ClassName}Service ${ClassName?uncap_first}Service;

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("selectOne")
    public ${ClassName} selectOne(${table.columns[0].columnType} id) {
        return this.${ClassName?uncap_first}Service.queryById(id);
    }

}